﻿#ifndef TIMEOUTDIALOG_H
#define TIMEOUTDIALOG_H

#include <QDialog>

namespace Ui {
class TimeoutDialog;
}

class TimeoutDialog : public QDialog
{
    Q_OBJECT

public:
    explicit TimeoutDialog(QWidget *parent = nullptr);
    ~TimeoutDialog();

    void setPostoff(bool enable);
    void start();
    void reset();


private:
    Ui::TimeoutDialog *ui;
    QTimer *timer;
    int curStep=0;
    int breakSteps=15;
private slots:
    void updateOneSec();
    void on_pushButton_clicked();
signals:
    void sendNormalBreak();
    void sendPostoffBreak();
    void sendHardBreak();
};

#endif // TIMEOUTDIALOG_H
